package com.jgk.gwt.recipes.maven.server;

import java.util.Random;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.jgk.gwt.recipes.maven.client.DemoService;
import com.jgk.gwt.recipes.maven.shared.DemoDetails;

@SuppressWarnings("serial")
public class DemoServiceImpl extends RemoteServiceServlet implements
		DemoService {
	
	private static Random myRandom = new Random(300);

	public DemoDetails getRandomDemoDetails() {
		//System.out.println("HERE in getRandomDemoDetails");
		int randInt = myRandom.nextInt();
		DemoDetails demoDetails = DemoDetails.createDemoDetails("id-"+randInt, "dv-"+randInt);
		return demoDetails;
	}

}
